package com.woniuxy.joylifeshop.service.serviceImpl;

import com.woniuxy.common.entity.ShopCompliant;
import com.woniuxy.common.mapper.ShopCompliantMapper;
import com.woniuxy.joylifeshop.exception.CompliantException;
import com.woniuxy.joylifeshop.service.CompliantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CompliantServiceImpl implements CompliantService {

    @Autowired
    ShopCompliantMapper shopCompliantMapper;

    /**
    * @Author SooYoo
    * @Description
    * @Param
    * @Return
    **/
    @Override
    public void createOneCompliant(ShopCompliant shopCompliant) {

        try {
            shopCompliantMapper.insert(shopCompliant);
        } catch (Exception e) {
            e.printStackTrace();
            throw new CompliantException();
        }
    }
}
